-- GENERATED SPELL FOR [Guardian of the Hawk] --


function spell0_22992(pUnit, Event) --@Curse of Blood,n/a--
pUnit:FullCastSpellOnTarget(40412,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22992', 1000, 1)
end

function spell1_22992(pUnit, Event) --@Death Hammer,n/a--
pUnit:FullCastSpellOnTarget(40358,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22992', 5500, 1)
end

function spell2_22992(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(40413,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22992', 1500, 1)
end

function Sorts_22992(pUnit, Event)
local choix_sorts_22992 = math.random(0, 2)
if choix_sorts_22992 == 0 then
pUnit:RegisterEvent('spell0_22992', 1, 1)
end
if choix_sorts_22992 == 1 then
pUnit:RegisterEvent('spell1_22992', 1, 1)
end
if choix_sorts_22992 == 2 then
pUnit:RegisterEvent('spell2_22992', 1, 1)
end
end

function mob22992_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22992', math.random(1500, 3000), 1)
end

function mob22992_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22992_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22992_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22992, 1, 'mob22992_Action')
RegisterUnitEvent(22992, 2, 'mob22992_Leave')
RegisterUnitEvent(22992, 3, 'mob22992_Kill')
RegisterUnitEvent(22992, 4, 'mob22992_Die')
